import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 执行任务
 */
@Entity('automation_task')
export class AutomationTaskEntity extends BaseEntity {
  @Column({ comment: '设备ID' })
  deviceId: string;

  @Column({ comment: '操作指令' })
  command: string;

  @Column({ comment: '执行顺序', default: 0 })
  order: number;

  @Index()
  @Column({ comment: '流水线ID' })
  pipelineId: number;
}